package com.shareach.search.baidu.domain;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import com.shareach.domain.Location;

@JsonSerialize(include=(JsonSerialize.Inclusion.NON_NULL))
@JsonIgnoreProperties(ignoreUnknown=true)
public class Place {
	public String name;//: "知味观 外东山店",
	public Location location;
	public String address;//: "外东山弄86号",
	public String telephone;//: "(0571)87963991",
	public String uid;//: "59e23d135b009d930ab93ad1",
	public String tag;//: "江浙小吃,西湖北线/黄龙",
	//--来自详细信息-------
	public String image;
	public Integer rate;
	public Integer price;
	//..............
	
	public List<String> alias;
	public List<String> tags;
	public HashMap<String, String> siteIds;
	public void addTag(String name){
		if(tags==null){
			tags = new ArrayList<String>();
		}
		if(tags.contains(name)) return;
		tags.add(name);
	}
	public void addSite(String siteName, String id){
		if(siteIds==null){
			siteIds = new HashMap<String, String>();
		}
		siteIds.put(siteName, id);
	}
	//public String detail_url: "http://api.map.baidu.com/place/detail?uid=59e23d135b009d930ab93ad1&output=html&source=placeapi"
	public String getName() {
		return name;
	}
	public Location getLocation() {
		return location;
	}
	public String getAddress() {
		return address;
	}
	public String getTelephone() {
		return telephone;
	}
	public String getUid() {
		return uid;
	}
	public String getTag() {
		return tag;
	}
	public String getImage() {
		return image;
	}
	public Integer getRate() {
		return rate;
	}
	public Integer getPrice() {
		return price;
	}
	public List<String> getAlias() {
		return alias;
	}
	public List<String> getTags() {
		return tags;
	}
	public HashMap<String, String> getSiteIds() {
		return siteIds;
	}
}
